home *** CD-ROM | disk | FTP | other *** search
-
-
-
- 1
-
- USING TASM
-
-
- This is absolutely the easiest chapter in the book. The default
- mode for TASM is something called MASM mode. It imitates what
- MASM does, warts and all. When you are finished with the Tutor,
- you can decide whether you want to use "IDEAL" mode.
-
- The following are the minor differences from MASM.
-
-
- ===== CHAPTER 1
-
- To assemble the file myprog.asm use:
-
- >tasm myprog
-
- You don't need commas or semicolons or anything. Then if you are
- using TLINK, use:
-
- >tlink myprog+\asmhelp
-
- The batch file for this would be:
-
- >tlink %1+\asmhelp
-
- No commas or semicolons.
-
-
- ===== CHAPTER 10
-
- To get your list file put three commas after the filename:
-
- .tasm myprog, , ,
-
- This will produce MYPROG.LST. You will notice that the list
- files look similar.
-
- Page 94 - This is the TURBO listing for variable2:
-
- 42 000E 8E C0 mov es,ax
- 43
- 44 0010 26: 8B 0E 0000r mov cx, variable2
- 45 0015 26: 89 0E 0000r mov variable2, cx
- 46
- 47 001A CB ret
-
-
- This is the TURBO listing for variable3:
-
- 42 000E 8E C0 mov es,ax
- 43
- 44 0010 2E: 8B 0E 0000r mov cx, variable3
- 45 0015 2E: 89 0E 0000r mov variable3, cx
- 46
- 47 001A CB ret
- 48
-
-
-
-
-
- The PC Assembler Tutor 2
- ______________________
-
-
- This is the TURBO listing for variable4:
-
- 42 000E 8E C0 mov es,ax
- 43
- 44 0010 36: 8B 0E 0000r mov cx, variable4
- 45 0015 36: 89 0E 0000r mov variable4, cx
- 46
- 47 001A CB ret
- 48
-
-
- Except for the line numbers at the left, they look exactly the
- same as what is in the text. TASM is calculating the segment
- overrides.
-
-
- PAGE 99 - This is the TURBO listing for calls similar to the ones
- on page 99:
-
- 89 0AFF E8 FEC8 call near_routine
- 90 0B02 9A 00000AF6sr call far_routine
- 91 0B07 E8 0000e call near_external_routine
- 92 0B0A 9A 00000000se call far_external_routine
- 93 0B0F E8 0000e call get_unsigned
-
- and here is the MASM output for the same file:
-
- 0AFF E8 09CA R call near_routine
- 0B02 9A 0AF6 ---- R call far_routine
- 0B07 E8 0000 E call near_external_routine
- 0B0A 9A 0000 ---- E call far_external_routine
- 0B0F E8 0000 E call get_unsigned
-
- Why is that first number different (FEC8 vs. 09CA)? Turbo knows
- the correct value so it is inserting it into the code. MASM is
- passing the information on to the linker for calculation. The
- first way makes the linking faster.
-
- Some of these numbers are reversed for display purposes. The
- actual code is the same.
-
-
- ===== CHAPTER 21
-
- You don't need to use EXE2BIN after TLINK. TLINK will make a .COM
- file (if possible) from object files if you use the /t option
- with the following commands:
-
- >tlink /t myprog
- >tlink /t prog1+prog2+prog3
-
- you will get .COM files as output.
-
-